package com.longli.tank.strategy;

import com.longli.tank.*;

public class FourDirFireStrategy implements FireStrategy{
    @Override
    public void fire(Player player) {
        int bx=player.getX()+ ResourceMgr.goodTankL.getWidth()/2-ResourceMgr.bulletL.getWidth()/2;
        int by=player.getY()+ResourceMgr.goodTankL.getHeight()/2-ResourceMgr.bulletL.getHeight()/2;
        Dir[] dirs= Dir.values();
        for(Dir dir:dirs){
            TankFrame.INSTANCE.add(new Bullet(bx,by,dir,player.getGroup()));
        }

    }
}
